package edu.hwadee.BEIS.repository;


import java.util.Set;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.format.annotation.DateTimeFormat;

import edu.hwadee.BEIS.entity.ProjectDeclare;
import edu.hwadee.BEIS.entity.SchoolBasicInfor;

/**
 * 项目申报实体类DAO
 * @author kingsong
 *
 */
public interface ProjectDeclareRepository extends JpaRepository<ProjectDeclare, Integer> {

	/**
	 * 返回指定审核状态的项目申报结果（分页形式）
	 * @param pageable  分页参数
	 * @param county_status  区县审核状态
	 * @param city_status  市局审核状态
	 * @return Page<ProjectDeclare>
	 */
	Page<ProjectDeclare> findByCountyAuditStatusIsAndCityAuditStatusIsOrderByModifyTimeDesc(Pageable pageable, Short county_status, Short city_status);

	/**
	 * 返回对应类型的项目信息（分页形式）
	 * @param pageable  分页参数
	 * @param county_status  区县审核状态
	 * @param city_status  市局审核状态
	 * @param project_type  项目类型
	 * @return  Page<ProjectDeclare>
	 */
	Page<ProjectDeclare> findByCountyAuditStatusIsAndCityAuditStatusIsAndProjectDeclareTypeIsOrderByModifyTime(Pageable pageable, Short county_status, Short city_status, String project_type);
//	Page<ProjectDeclare> findBySchoolBasicInforIn(Pageable pageable, Set<SchoolBasicInfor> schoolBasicInfors);
}
